package com.stox.charting.ui.swing.action;

import java.awt.event.ActionEvent;
import java.util.List;

import com.stox.charting.ui.swing.presenter.ChartingInternalFrameViewPresenter;
import com.stox.core.model.intf.HasBars;
import com.stox.ioc.Container;

public class NewChartAction extends AbstractChartAction {

	private ChartingInternalFrameViewPresenter chartingInternalFrameViewPresenter;
	
	@Override
	public void actionPerformed(ActionEvent e, List<HasBars> hasBars) {
		if(chartingInternalFrameViewPresenter == null){
			chartingInternalFrameViewPresenter = Container.get(ChartingInternalFrameViewPresenter.class);
		}
		chartingInternalFrameViewPresenter.present(hasBars);
	}
	
}
